package com.itcast.bulls.stock.deal.service.trade;

import com.itcast.bulls.stock.common.exception.ComponentException;
import com.itcast.bulls.stock.entity.quote.TradeStockQuoteLast;
import com.itcast.bulls.stock.entity.trade.TradeOrder;
import com.itcast.bulls.stock.struct.grpc.trade.PlaceOrderRequest;

import java.util.concurrent.CompletionException;


public interface IStockDealService {

    /**
     * 处理市价单接口
     * @param request
     * @param quoteLast
     * @return
     * @throws CompletionException
     */
    TradeOrder processMarketOrder(PlaceOrderRequest request, TradeStockQuoteLast quoteLast) throws CompletionException, ComponentException;

    TradeOrder getOrder(long orderId);
}
